package com.fessc.develop.entity.comvo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fessc.develop.utils.BusiUtil;
import com.fessc.develop.utils.DateUtil;
import lombok.Data;
import org.springframework.stereotype.Service;

@Data
@Service
public class CommonHeadSendVo {

    @JsonProperty("BRANCH")
    String branch; //预留字段

    @JsonProperty("SERVICE_CODE")
    String serviceCode; //接口服务码

    @JsonProperty("ORG_CODE")
    String orgCode; //机构编码

    @JsonProperty("BANK_ID")
    String bankId; //银行编号

    @JsonProperty("TRAN_DATE")
    String tranDate; //交易日期

    @JsonProperty("TRAN_TIMESTAMP")
    String tranTimestamp; //交易时间

    @JsonProperty("CHANNEL_SEQ_NO")
    String channelSeqNo; //交易流水号

    public CommonHeadSendVo() {
        this.channelSeqNo = BusiUtil.getSerialNumber("", "0123456789", 5);  //流水号
        this.tranDate = DateUtil.getCurrentDateTime(DateUtil.DATE_SIMP_FORMAT);  //交易日期
        this.tranTimestamp = DateUtil.getCurrentDateTime(DateUtil.DATE_TIME_HM_FORMAT);  //交易时间
    }

}
